<template>
	<view class="container">
		<JournalHeader />
		<view>
			<journal-main />
		</view>
	</view>
</template>

<script>
import JournalHeader from "./components/journalHeader/journalHeader.vue";
import JournalMain from "./components/journalMain/journalMain.vue";
import { mapActions , mapState } from 'vuex'
export default {
	data() {
		return {};
	},
    computed:{
        ...mapState("userStore" , ["userInfo"])
    },
    methods:{
		...mapActions("journalStore", ["getjournalListOptionAction"]),
    },
	created() {
		const option = {
			now_time: new Date(),
			status: "day",
			user_id: this.userInfo.id,
		};
		this.getjournalListOptionAction(option); // 初始化请求日记参数
	},
	components: {
		JournalHeader,
		JournalMain,
	},
	watch: {},
};
</script>

<style lang="scss" scoped></style>
<style>
page {
	background: #f3f4f5;
}
</style>
